<script>
export default {
    name: "itemCustom",
    props: {
        value: [Number, String, undefined, null],
        change: Function,
    },
    data() {
        return {
            configSelf: {},
            options: null,
            valueSelf: undefined,
        };
    },
    watch: {
        value: {
            handler(val) {
                this.valueSelf = val;
            },
            immediate: true,
        }
    },
    methods: {
        init() {
            this.configSelf = { ...this.config };
        },
        setValueSelf(value) {
            this.change(value);
        },
    },
    render() {
        return (
           <div>
            这是一个自定义的组件
            <el-rate vModel={this.configSelf} onChange={this.setValueSelf}></el-rate>
            </div>
        );
    },
};
</script>
